package com.sky.exception;

/**
 * @Description 返回消息
 **/

public enum ResultApi {

    // SYS
    SUCCESS(0, "SUCCESS"),
    //ERROR
    USER_EXPIRE(401, "用户信息失效,请重新登录！"),
    USER_TOKEN_ILLEGAL(401, "[用户]非法令牌"),
    USER_TOKEN_EXPIRED(401, "[用户]登陆已过期, 请重新登录"),
    USER_NOT_EXIST(1, "[用户]该用户不存在！"),
    USER_PASSWORD_ERROR(1, "[用户]密码错误！"),
    USER_UNAUTHORIZED_ERROR(1, "[用户]无权访问！"),
    MISSING_PARAMETER_ERROR(111, "缺少必须参数！"),
    PARAMETER_VALUE_ERROR(112, "参数传值错误！"),
    User_CODE_ISALERDAY(1,"员工编号不可重复，请重新输入！"),
    PHONE_EXIST(1,"手机号已存在，请重新输入！"),
    //
    FILE_ERROR(2, "URL获取文件数据流报错"),
    UPLOAD_TYPE_ERROR(2, "文件上传策略异常"),
    FILE_WRITE_ERROR(2, "将图片写入到磁盘报错"),

    SERVRE_ERROR(3, "[服务器]服务器内部错误"),
    DATE_ERROR(4, "[服务器]服务器内部错误"),
    PARAMS_ERROR(5, "前端传入list型字符串添加双引号参数异常！"),
    UNMATCH_ERROR(6, "参数不能为空！"),

    //
    USER_NO_MENUS(7,"该角色尚未配置菜单"),

    //会员
    PHONE_REGISTER_ERROR(10, "该手机号已经注册！"),
    VCODE_ERROR(11, "验证码错误！"),
    VCODE_INVALID(11, "验证码失效！"),
//    VCODE_MORE(11, "此手机号验证码当日发送次数超"+ConstantUtil.VCODE_MAX_NUM+"次！"),
    VCODE_SEND_FAIL(11, "发送失败！"),
    OLD_PWD_ERROR(11, "原密码错误！"),
    NO_MEMBER_ERROR(11, "该手机号码尚未注册，请先注册"),
    //购物车,
    COUNT_LESS_ZERO(12, "数量需大于0"),
    INVENTORY_NOT_ENOUGH(12, "库存不足！请重新选择"),
    CART_GOODS_NOT_EXIST(12, "购物车中已存在多件商品,请删除后重新添加"),
    CART_GOODS_CHANGED(12, "所选商品已经发生变化，请重新下单！"),
    //商品规格,
    NO_CATEGORY(14, "请先设置商品规格"),
    EXIST_ERROR(13, "该商品规格已存在！"),
    NOT_EXIST_ERROR(13, "该商品规格不存在！"),
    NO_GOODS_SPEC(13,"该商品不存在规格,请先维护规格"),
    NOT_UPDATE_GOODS(13,"该商品不允许编辑"),
    SKU_ARRAY_EMPTY(14, "参数不能为空"),
    GOODS_NOT_EXIST(12, "商品不存在，请重新选择"),
    GOODS_NOT_EXIST1(12, "占点数量不能大于6"),
    GOODS_NOT_NEED_SUBSCRIBE(12, "商品不需要预约"),
    //订单
    ORDER_NOT_EXIST(14,"订单不存在"),
    ORDER_DETAIL_NOT_EXIST(14,"订单详情不存在"),
    ORDER_PAY(14,"订单已支付"),
    ORDER_CAN_NOT_REFUND(14,"该订单禁止退款"),
    ORDER_REFUND_ERROR(14,"退款失败"),
    ORDER_IN_PAY(14,"订单支付中，请勿再次支付"),
    ORDER_REFUND_ERROR_NOTLINE(14,"线下支付订单无法进行退款"),
    ORDER_CAN_NOT_REFUSE(14,"无权拒绝退款"),
    ORDER_CAN_NOT_RETURN_GOODS(14,"订单无法进行退货申请审核"),
    ORDER_CAN_NOT_EXCHANGE_GOODS(14,"订单无法进行换货申请审核"),
    CHOOSE_GOODS(14,"请选择购物车商品提交订单"),
    ORDER_CAN_NOT_RECIEPT(14,"订单无法确认收货"),
    ORDER_CAN_NOT_START_SERVICE(14,"订单不在待服务状态，不能开始服务"),
    ORDER_CAN_NOT_END_SERVICE(14,"订单不在服务中状态，开始完成服务"),
    ORDER_CAN_NOT_CONFIRM(14,"存在未确认收货商品，订单无法确认收货"),
    ORDER_CAN_NOT_RECORD(14,"订单为通过退换货申请，禁止录入退货单号"),
    ORDER_CAN_NOT_APPLYREFUND(14,"当前订单不能申请售后"),
    ORDER_CAN_NOT_APPLYRETURN(14,"该订单无法申请退换货"),
    ORDER_CAN_NOT_RECORD_RESN(14,"未收到退货，禁止重新发货"),
    ORDER_CAN_NOT_APPROVED(14,"订单不能进行审核"),
    ORDER_CAN_NOT_DELIVER(14,"订单不能发货"),
    ORDER_CAN_NOT_COLLECT(14,"订单不能确认收款"),
    ORDER_PAY_ERROR(14,"订单调用支付失败"),
    ORDER_CAN_NOT_CANCEL(14,"订单不能取消"),
    ORDER_CAN_NOT_DELETE(14,"订单不能刪除"),
    ORDER_CREATE_ERROR(14,"预约失败，请重新选择时间"),
    ORDER_CAN_NOT_CHANGE_TIME(14,"订单不在待服务状态，不能修改预约时间"),
    ORDER_CAN_NOT_UPDATE(14,"订单未付款，不能编辑"),
    GOODS_NUM_ERROR(14,"商品数量不符"),
    ORDER_SET_THE_PHOTO_METHOD(14,"请设置取片方式"),
    ORDER_UPLOAD_PICTURES(14,"请上传图片"),
    ORDER_CAN_NOT_SET_REFUND(14,"当前金额超过当前订单的实付金额,请重新设置!"),
    // 发票
    CAN_NOT_UPDATE_FP(14,"当前状态不能做此操作"),
    //回购
    CORE_REPO_NOT_CANCEL(15,"订单无法取消"),
    CORE_REPO_NOT_AUDIT(15,"订单无需审核"),
    CORE_REPO_NOT_EXPRESS(15,"订单无需填写快递单号"),
    //类目 Category to repeat
    CATEGORY_TO_REPEAT(16,"二级类目名称重复"),
    //店铺
    SHOP_NOT_EXIST(15,"店铺不存在"),
    SHOP_NOT_EXIST_POS(15,"店铺POS异常"),
    //美团
    MT_CODE_ERROR(18,"券码有误"),
    MT_CODE_USED(18,"此券码已使用，请重新查证！"),
    // 排单
    GREATER_THAN_MAX(14,"大于门店最大值"),
    EQUAL_TO_CURRENT(14,"等于门店当前值"),
    HAVE_SUBSCRIBE(14,"有预约，不能减少排单行数"),
    NO_PLAN(14,"当前占点没有订单信息"),
    //拍摄订单
    ;
    private int code;
    private String msg;

    ResultApi(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int code() {
        return this.code;
    }

    public String msg() {
        return this.msg;
    }
}
